<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Contact extends Home_Controller {
    
    public function __construct() {
        parent::__construct();
      	$this->load->model('home_leamessage_model');
    }
	
	public function index(){
		$data = array();
		$data['top_menu'] = "contact";
		$data['left_menu'] = "recruitment";
		$this->layout_view('home/contact/contact_index',$data);
	}
	
	public function recruitment(){
		$data = array();
		$data['top_menu'] = "contact";
		$data['left_menu'] = "recruitment";
		$this->layout_view('home/contact/contact_recruitment',$data);
	}
	public function recruitment_idea(){
		$data = array();
		$data['top_menu'] = "contact";
		$data['left_menu'] = "recruitment_idea";
		$this->layout_view('home/contact/contact_recruitment_idea',$data);
	}
	
	public function user_contact_msg(){
		$msg_name = $this->input->get_post('msg_name');
		$msg_tel = $this->input->get_post('msg_tel');
		$msg_content = $this->input->get_post('msg_content');
		$data = array(
			'name'=>$msg_name,
			'tel'=>$msg_tel,
			'content'=>$msg_content,
			'ip'=>get_client_ip(),
			'addtime'=>date('Y-m-d H:i:s',time()),
		);
		$this->home_leamessage_model->create($data);
		apiResponse(200,"提交成功");
	}
    

}
